package com.sample

import android.app.Application
import com.amitshekhar.DebugDB
import com.amitshekhar.debug.sqlite.DebugDBFactory
import com.sample.datastore.Sp
import com.sample.datastore.Sp.commonDataStore
import com.sample.datastore.Sp.dataStore

/**
 * Author:Wang Xiaolong, 2022/3/15 9:37
 */
class App : Application() {

    companion object {
        lateinit var instance: App
    }

    init {
        instance = this
    }

    override fun onCreate() {
        super.onCreate()
        DebugDB.initialize(
            this, DebugDBFactory(), mapOf(
                Sp.COMMON_STORE_NAME to commonDataStore,
                Sp.STORE_NAME to dataStore
            )
        )
    }

}